<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>TeamSpeak 3 PHP Framework: TeamSpeak3_Transport_UDP Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="TeamSpeak.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">TeamSpeak 3 PHP Framework
   &#160;<span id="projectnumber">1.1.23</span>
   </div>
   <div id="projectbrief">Copyright © Planet TeamSpeak. All rights reserved.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_team_speak3___transport___u_d_p.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_team_speak3___transport___u_d_p-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">TeamSpeak3_Transport_UDP Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Class for connecting to a remote server through UDP.  
 <a href="class_team_speak3___transport___u_d_p.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for TeamSpeak3_Transport_UDP:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
 <div class="center">
  <img src="class_team_speak3___transport___u_d_p.png" usemap="#TeamSpeak3_Transport_UDP_map" alt=""/>
  <map id="TeamSpeak3_Transport_UDP_map" name="TeamSpeak3_Transport_UDP_map">
<area href="class_team_speak3___transport___abstract.html" title="Abstract class for connecting to a TeamSpeak 3 Server through different ways of transport. " alt="TeamSpeak3_Transport_Abstract" shape="rect" coords="0,0,199,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a38cf41fc697a8a79220b8dcc8307faef"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___transport___u_d_p.html#a38cf41fc697a8a79220b8dcc8307faef">connect</a> ()</td></tr>
<tr class="memdesc:a38cf41fc697a8a79220b8dcc8307faef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects to a remote server.  <a href="#a38cf41fc697a8a79220b8dcc8307faef">More...</a><br/></td></tr>
<tr class="separator:a38cf41fc697a8a79220b8dcc8307faef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab47ad7c8e213167430b4a495ec9f7b21"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___transport___u_d_p.html#ab47ad7c8e213167430b4a495ec9f7b21">disconnect</a> ()</td></tr>
<tr class="memdesc:ab47ad7c8e213167430b4a495ec9f7b21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnects from a remote server.  <a href="#ab47ad7c8e213167430b4a495ec9f7b21">More...</a><br/></td></tr>
<tr class="separator:ab47ad7c8e213167430b4a495ec9f7b21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af854c17875858a0a57cfa08a20786836"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___transport___u_d_p.html#af854c17875858a0a57cfa08a20786836">read</a> ($length=4096)</td></tr>
<tr class="memdesc:af854c17875858a0a57cfa08a20786836"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads data from the stream.  <a href="#af854c17875858a0a57cfa08a20786836">More...</a><br/></td></tr>
<tr class="separator:af854c17875858a0a57cfa08a20786836"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fd9e15b4b86ff749033c12610563f10"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___transport___u_d_p.html#a3fd9e15b4b86ff749033c12610563f10">send</a> ($data)</td></tr>
<tr class="memdesc:a3fd9e15b4b86ff749033c12610563f10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes data to the stream.  <a href="#a3fd9e15b4b86ff749033c12610563f10">More...</a><br/></td></tr>
<tr class="separator:a3fd9e15b4b86ff749033c12610563f10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9ad59b6ff973ab97cb4e2ec75b6b9b1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___transport___abstract.html#ad9ad59b6ff973ab97cb4e2ec75b6b9b1">__sleep</a> ()</td></tr>
<tr class="memdesc:ad9ad59b6ff973ab97cb4e2ec75b6b9b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Commit pending data.  <a href="#ad9ad59b6ff973ab97cb4e2ec75b6b9b1">More...</a><br/></td></tr>
<tr class="separator:ad9ad59b6ff973ab97cb4e2ec75b6b9b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9947fe29ce0055f9a6e9c5bd7cff1be"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___transport___abstract.html#af9947fe29ce0055f9a6e9c5bd7cff1be">__wakeup</a> ()</td></tr>
<tr class="memdesc:af9947fe29ce0055f9a6e9c5bd7cff1be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reconnects to the remote server.  <a href="#af9947fe29ce0055f9a6e9c5bd7cff1be">More...</a><br/></td></tr>
<tr class="separator:af9947fe29ce0055f9a6e9c5bd7cff1be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a847453109ae2d41b4b119aa802f05e64"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___transport___abstract.html#a847453109ae2d41b4b119aa802f05e64">getStream</a> ()</td></tr>
<tr class="memdesc:a847453109ae2d41b4b119aa802f05e64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the underlying stream resource.  <a href="#a847453109ae2d41b4b119aa802f05e64">More...</a><br/></td></tr>
<tr class="separator:a847453109ae2d41b4b119aa802f05e64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9bec37a13a1483833c80ffd008d4596"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___transport___abstract.html#ac9bec37a13a1483833c80ffd008d4596">getConfig</a> ($key=null, $default=null)</td></tr>
<tr class="memdesc:ac9bec37a13a1483833c80ffd008d4596"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the configuration variables in this adapter.  <a href="#ac9bec37a13a1483833c80ffd008d4596">More...</a><br/></td></tr>
<tr class="separator:ac9bec37a13a1483833c80ffd008d4596"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68321617cad0b775bb941f19fabea6b5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___transport___abstract.html#a68321617cad0b775bb941f19fabea6b5">setAdapter</a> (<a class="el" href="class_team_speak3___adapter___abstract.html">TeamSpeak3_Adapter_Abstract</a> $adapter)</td></tr>
<tr class="memdesc:a68321617cad0b775bb941f19fabea6b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <a class="el" href="class_team_speak3___adapter___abstract.html" title="Provides low-level methods for concrete adapters to communicate with a TeamSpeak 3 Server...">TeamSpeak3_Adapter_Abstract</a> object using this transport.  <a href="#a68321617cad0b775bb941f19fabea6b5">More...</a><br/></td></tr>
<tr class="separator:a68321617cad0b775bb941f19fabea6b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ccffaa9c25155aee837d4e6dee8a037"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___transport___abstract.html#a4ccffaa9c25155aee837d4e6dee8a037">getAdapter</a> ()</td></tr>
<tr class="memdesc:a4ccffaa9c25155aee837d4e6dee8a037"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <a class="el" href="class_team_speak3___adapter___abstract.html" title="Provides low-level methods for concrete adapters to communicate with a TeamSpeak 3 Server...">TeamSpeak3_Adapter_Abstract</a> object using this transport.  <a href="#a4ccffaa9c25155aee837d4e6dee8a037">More...</a><br/></td></tr>
<tr class="separator:a4ccffaa9c25155aee837d4e6dee8a037"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4cbdd67c5590f756a4fb5ddd5d53bbe1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___transport___abstract.html#a4cbdd67c5590f756a4fb5ddd5d53bbe1">getAdapterType</a> ()</td></tr>
<tr class="memdesc:a4cbdd67c5590f756a4fb5ddd5d53bbe1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the adapter type.  <a href="#a4cbdd67c5590f756a4fb5ddd5d53bbe1">More...</a><br/></td></tr>
<tr class="separator:a4cbdd67c5590f756a4fb5ddd5d53bbe1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d3e42ebfb02f2f9b4af8e80f2209b28"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___transport___abstract.html#a9d3e42ebfb02f2f9b4af8e80f2209b28">getMetaData</a> ()</td></tr>
<tr class="memdesc:a9d3e42ebfb02f2f9b4af8e80f2209b28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns header/meta data from stream pointer.  <a href="#a9d3e42ebfb02f2f9b4af8e80f2209b28">More...</a><br/></td></tr>
<tr class="separator:a9d3e42ebfb02f2f9b4af8e80f2209b28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b1d6d9d2f48fae3165cd5a863cdefe1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___transport___abstract.html#a2b1d6d9d2f48fae3165cd5a863cdefe1">isConnected</a> ()</td></tr>
<tr class="memdesc:a2b1d6d9d2f48fae3165cd5a863cdefe1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns TRUE if the transport is connected.  <a href="#a2b1d6d9d2f48fae3165cd5a863cdefe1">More...</a><br/></td></tr>
<tr class="separator:a2b1d6d9d2f48fae3165cd5a863cdefe1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a9826487851b638f3ad942847eae49c58"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___transport___abstract.html#a9826487851b638f3ad942847eae49c58">waitForReadyRead</a> ($time=0)</td></tr>
<tr class="memdesc:a9826487851b638f3ad942847eae49c58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Blocks a stream until data is available for reading if the stream is connected in non-blocking mode.  <a href="#a9826487851b638f3ad942847eae49c58">More...</a><br/></td></tr>
<tr class="separator:a9826487851b638f3ad942847eae49c58"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a4ca555c5c0936eb5404d3900ca5f8edc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4ca555c5c0936eb5404d3900ca5f8edc"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>$config</b> = null</td></tr>
<tr class="separator:a4ca555c5c0936eb5404d3900ca5f8edc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fcce47a6397f0b924a592493d9b2ba1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7fcce47a6397f0b924a592493d9b2ba1"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>$stream</b> = null</td></tr>
<tr class="separator:a7fcce47a6397f0b924a592493d9b2ba1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98783cbca81a252f760577a711e84864"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a98783cbca81a252f760577a711e84864"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>$adapter</b> = null</td></tr>
<tr class="separator:a98783cbca81a252f760577a711e84864"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class for connecting to a remote server through UDP. </p>

<p>Definition at line <a class="el" href="_u_d_p_8php_source.html#l00032">32</a> of file <a class="el" href="_u_d_p_8php_source.html">UDP.php</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a38cf41fc697a8a79220b8dcc8307faef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Transport_UDP::connect </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Connects to a remote server. </p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="class_team_speak3___transport___exception.html" title="Enhanced exception class for TeamSpeak3_Transport_Abstract objects. ">TeamSpeak3_Transport_Exception</a></td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="_u_d_p_8php_source.html#l00040">40</a> of file <a class="el" href="_u_d_p_8php_source.html">UDP.php</a>.</p>

<p>References <a class="el" href="_string_8php_source.html#l00063">TeamSpeak3_Helper_String\factory()</a>.</p>

<p>Referenced by <a class="el" href="_u_d_p_8php_source.html#l00082">read()</a>, and <a class="el" href="_u_d_p_8php_source.html#l00105">send()</a>.</p>
<div class="fragment"><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;  {</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordflow">if</span>($this-&gt;stream !== null) <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    $host = strval($this-&gt;config[<span class="stringliteral">&quot;host&quot;</span>]);</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    $port = strval($this-&gt;config[<span class="stringliteral">&quot;port&quot;</span>]);</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    $address = <span class="stringliteral">&quot;udp://&quot;</span> . $host . <span class="stringliteral">&quot;:&quot;</span> . $port;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    $timeout = intval($this-&gt;config[<span class="stringliteral">&quot;timeout&quot;</span>]);</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    $this-&gt;stream = @stream_socket_client($address, $errno, $errstr, $timeout);</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keywordflow">if</span>($this-&gt;stream === FALSE)</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    {</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;      <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="class_team_speak3___transport___exception.html" title="Enhanced exception class for TeamSpeak3_Transport_Abstract objects. ">TeamSpeak3_Transport_Exception</a>(<a class="code" href="class_team_speak3___helper___string.html#a475f5a602d67dd0568fb8c86352c88a0" title="Returns a TeamSpeak3_Helper_String object for thegiven string. ">TeamSpeak3_Helper_String::factory</a>($errstr)-&gt;toUtf8()-&gt;toString(), $errno);</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    }</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    @stream_set_timeout($this-&gt;stream, $timeout);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    @stream_set_blocking($this-&gt;stream, $this-&gt;config[<span class="stringliteral">&quot;blocking&quot;</span>] ? 1 : 0);</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab47ad7c8e213167430b4a495ec9f7b21"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Transport_UDP::disconnect </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disconnects from a remote server. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="_u_d_p_8php_source.html#l00066">66</a> of file <a class="el" href="_u_d_p_8php_source.html">UDP.php</a>.</p>

<p>References <a class="el" href="_transport_2_abstract_8php_source.html#l00207">TeamSpeak3_Transport_Abstract\getAdapterType()</a>, and <a class="el" href="_signal_8php_source.html#l00204">TeamSpeak3_Helper_Signal\getInstance()</a>.</p>
<div class="fragment"><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  {</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <span class="keywordflow">if</span>($this-&gt;stream === null) <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    $this-&gt;stream = null;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <a class="code" href="class_team_speak3___helper___signal.html#af156036673730a599c10c8cbfd5e50bf" title="Returns a singleton instance of TeamSpeak3_Helper_Signal. ">TeamSpeak3_Helper_Signal::getInstance</a>()-&gt;emit(strtolower($this-&gt;<a class="code" href="class_team_speak3___transport___abstract.html#a4cbdd67c5590f756a4fb5ddd5d53bbe1" title="Returns the adapter type. ">getAdapterType</a>()) . <span class="stringliteral">&quot;Disconnected&quot;</span>);</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af854c17875858a0a57cfa08a20786836"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Transport_UDP::read </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$length</em> = <code>4096</code>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads data from the stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">integer</td><td class="paramname">$length</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="class_team_speak3___transport___exception.html" title="Enhanced exception class for TeamSpeak3_Transport_Abstract objects. ">TeamSpeak3_Transport_Exception</a></td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_team_speak3___helper___string.html" title="Helper class for string handling. ">TeamSpeak3_Helper_String</a> </dd></dl>

<p>Definition at line <a class="el" href="_u_d_p_8php_source.html#l00082">82</a> of file <a class="el" href="_u_d_p_8php_source.html">UDP.php</a>.</p>

<p>References <a class="el" href="_u_d_p_8php_source.html#l00040">connect()</a>, <a class="el" href="_transport_2_abstract_8php_source.html#l00207">TeamSpeak3_Transport_Abstract\getAdapterType()</a>, <a class="el" href="_signal_8php_source.html#l00204">TeamSpeak3_Helper_Signal\getInstance()</a>, and <a class="el" href="_transport_2_abstract_8php_source.html#l00252">TeamSpeak3_Transport_Abstract\waitForReadyRead()</a>.</p>
<div class="fragment"><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  {</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    $this-&gt;<a class="code" href="class_team_speak3___transport___u_d_p.html#a38cf41fc697a8a79220b8dcc8307faef" title="Connects to a remote server. ">connect</a>();</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    $this-&gt;<a class="code" href="class_team_speak3___transport___abstract.html#a9826487851b638f3ad942847eae49c58" title="Blocks a stream until data is available for reading if the stream is connected in non-blocking mode...">waitForReadyRead</a>();</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    $data = @fread($this-&gt;stream, $length);</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <a class="code" href="class_team_speak3___helper___signal.html#af156036673730a599c10c8cbfd5e50bf" title="Returns a singleton instance of TeamSpeak3_Helper_Signal. ">TeamSpeak3_Helper_Signal::getInstance</a>()-&gt;emit(strtolower($this-&gt;<a class="code" href="class_team_speak3___transport___abstract.html#a4cbdd67c5590f756a4fb5ddd5d53bbe1" title="Returns the adapter type. ">getAdapterType</a>()) . <span class="stringliteral">&quot;DataRead&quot;</span>, $data);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordflow">if</span>($data === FALSE)</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    {</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;      <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="class_team_speak3___transport___exception.html" title="Enhanced exception class for TeamSpeak3_Transport_Abstract objects. ">TeamSpeak3_Transport_Exception</a>(<span class="stringliteral">&quot;connection to server &#39;&quot;</span> . $this-&gt;config[<span class="stringliteral">&quot;host&quot;</span>] . <span class="stringliteral">&quot;:&quot;</span> . $this-&gt;config[<span class="stringliteral">&quot;port&quot;</span>] . <span class="stringliteral">&quot;&#39; lost&quot;</span>);</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    }</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="class_team_speak3___helper___string.html" title="Helper class for string handling. ">TeamSpeak3_Helper_String</a>($data);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3fd9e15b4b86ff749033c12610563f10"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Transport_UDP::send </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$data</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes data to the stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">string</td><td class="paramname">$data</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="_u_d_p_8php_source.html#l00105">105</a> of file <a class="el" href="_u_d_p_8php_source.html">UDP.php</a>.</p>

<p>References <a class="el" href="_u_d_p_8php_source.html#l00040">connect()</a>, <a class="el" href="_transport_2_abstract_8php_source.html#l00207">TeamSpeak3_Transport_Abstract\getAdapterType()</a>, and <a class="el" href="_signal_8php_source.html#l00204">TeamSpeak3_Helper_Signal\getInstance()</a>.</p>
<div class="fragment"><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  {</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    $this-&gt;<a class="code" href="class_team_speak3___transport___u_d_p.html#a38cf41fc697a8a79220b8dcc8307faef" title="Connects to a remote server. ">connect</a>();</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    @stream_socket_sendto($this-&gt;stream, $data);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <a class="code" href="class_team_speak3___helper___signal.html#af156036673730a599c10c8cbfd5e50bf" title="Returns a singleton instance of TeamSpeak3_Helper_Signal. ">TeamSpeak3_Helper_Signal::getInstance</a>()-&gt;emit(strtolower($this-&gt;<a class="code" href="class_team_speak3___transport___abstract.html#a4cbdd67c5590f756a4fb5ddd5d53bbe1" title="Returns the adapter type. ">getAdapterType</a>()) . <span class="stringliteral">&quot;DataSend&quot;</span>, $data);</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad9ad59b6ff973ab97cb4e2ec75b6b9b1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Transport_Abstract::__sleep </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Commit pending data. </p>
<dl class="section return"><dt>Returns</dt><dd>array </dd></dl>

<p>Definition at line <a class="el" href="_transport_2_abstract_8php_source.html#l00092">92</a> of file <a class="el" href="_transport_2_abstract_8php_source.html">Abstract.php</a>.</p>
<div class="fragment"><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  {</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordflow">return</span> array(<span class="stringliteral">&quot;config&quot;</span>);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af9947fe29ce0055f9a6e9c5bd7cff1be"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Transport_Abstract::__wakeup </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reconnects to the remote server. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="_transport_2_abstract_8php_source.html#l00102">102</a> of file <a class="el" href="_transport_2_abstract_8php_source.html">Abstract.php</a>.</p>

<p>References <a class="el" href="class_team_speak3___transport___abstract.html#a496c0c50f4a9921e86b0b13798b4f157">TeamSpeak3_Transport_Abstract\connect()</a>.</p>
<div class="fragment"><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;  {</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    $this-&gt;<a class="code" href="class_team_speak3___transport___abstract.html#a496c0c50f4a9921e86b0b13798b4f157" title="Connects to a remote server. ">connect</a>();</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a847453109ae2d41b4b119aa802f05e64"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Transport_Abstract::getStream </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the underlying stream resource. </p>
<dl class="section return"><dt>Returns</dt><dd>resource </dd></dl>

<p>Definition at line <a class="el" href="_transport_2_abstract_8php_source.html#l00159">159</a> of file <a class="el" href="_transport_2_abstract_8php_source.html">Abstract.php</a>.</p>
<div class="fragment"><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;  {</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <span class="keywordflow">return</span> $this-&gt;stream;</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ac9bec37a13a1483833c80ffd008d4596"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Transport_Abstract::getConfig </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$key</em> = <code>null</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$default</em> = <code>null</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the configuration variables in this adapter. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">string</td><td class="paramname">$key</td><td></td></tr>
    <tr><td class="paramtype">mixed</td><td class="paramname">$default</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>array </dd></dl>

<p>Definition at line <a class="el" href="_transport_2_abstract_8php_source.html#l00171">171</a> of file <a class="el" href="_transport_2_abstract_8php_source.html">Abstract.php</a>.</p>
<div class="fragment"><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;  {</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keywordflow">if</span>($key !== null)</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    {</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;      <span class="keywordflow">return</span> array_key_exists($key, $this-&gt;config) ? $this-&gt;config[$key] : $default;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    }</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    <span class="keywordflow">return</span> $this-&gt;config;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a68321617cad0b775bb941f19fabea6b5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Transport_Abstract::setAdapter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_team_speak3___adapter___abstract.html">TeamSpeak3_Adapter_Abstract</a>&#160;</td>
          <td class="paramname"><em>$adapter</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the <a class="el" href="class_team_speak3___adapter___abstract.html" title="Provides low-level methods for concrete adapters to communicate with a TeamSpeak 3 Server...">TeamSpeak3_Adapter_Abstract</a> object using this transport. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype"><a class="el" href="class_team_speak3___adapter___abstract.html" title="Provides low-level methods for concrete adapters to communicate with a TeamSpeak 3 Server...">TeamSpeak3_Adapter_Abstract</a></td><td class="paramname">$adapter</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="_transport_2_abstract_8php_source.html#l00187">187</a> of file <a class="el" href="_transport_2_abstract_8php_source.html">Abstract.php</a>.</p>
<div class="fragment"><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;  {</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    $this-&gt;adapter = $adapter;</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a4ccffaa9c25155aee837d4e6dee8a037"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Transport_Abstract::getAdapter </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the <a class="el" href="class_team_speak3___adapter___abstract.html" title="Provides low-level methods for concrete adapters to communicate with a TeamSpeak 3 Server...">TeamSpeak3_Adapter_Abstract</a> object using this transport. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_team_speak3___adapter___abstract.html" title="Provides low-level methods for concrete adapters to communicate with a TeamSpeak 3 Server...">TeamSpeak3_Adapter_Abstract</a> </dd></dl>

<p>Definition at line <a class="el" href="_transport_2_abstract_8php_source.html#l00197">197</a> of file <a class="el" href="_transport_2_abstract_8php_source.html">Abstract.php</a>.</p>

<p>Referenced by <a class="el" href="_transport_2_abstract_8php_source.html#l00252">TeamSpeak3_Transport_Abstract\waitForReadyRead()</a>.</p>
<div class="fragment"><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;  {</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    <span class="keywordflow">return</span> $this-&gt;adapter;</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a4cbdd67c5590f756a4fb5ddd5d53bbe1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Transport_Abstract::getAdapterType </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the adapter type. </p>
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>

<p>Definition at line <a class="el" href="_transport_2_abstract_8php_source.html#l00207">207</a> of file <a class="el" href="_transport_2_abstract_8php_source.html">Abstract.php</a>.</p>

<p>References <a class="el" href="_string_8php_source.html#l00063">TeamSpeak3_Helper_String\factory()</a>.</p>

<p>Referenced by <a class="el" href="_t_c_p_8php_source.html#l00066">TeamSpeak3_Transport_TCP\disconnect()</a>, <a class="el" href="_u_d_p_8php_source.html#l00066">disconnect()</a>, <a class="el" href="_u_d_p_8php_source.html#l00082">read()</a>, <a class="el" href="_t_c_p_8php_source.html#l00082">TeamSpeak3_Transport_TCP\read()</a>, <a class="el" href="_t_c_p_8php_source.html#l00106">TeamSpeak3_Transport_TCP\readLine()</a>, <a class="el" href="_u_d_p_8php_source.html#l00105">send()</a>, <a class="el" href="_t_c_p_8php_source.html#l00146">TeamSpeak3_Transport_TCP\send()</a>, and <a class="el" href="_transport_2_abstract_8php_source.html#l00252">TeamSpeak3_Transport_Abstract\waitForReadyRead()</a>.</p>
<div class="fragment"><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;  {</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    <span class="keywordflow">if</span>($this-&gt;adapter instanceof <a class="code" href="class_team_speak3___adapter___abstract.html" title="Provides low-level methods for concrete adapters to communicate with a TeamSpeak 3 Server...">TeamSpeak3_Adapter_Abstract</a>)</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    {</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;      $string = <a class="code" href="class_team_speak3___helper___string.html#a475f5a602d67dd0568fb8c86352c88a0" title="Returns a TeamSpeak3_Helper_String object for thegiven string. ">TeamSpeak3_Helper_String::factory</a>(get_class($this-&gt;adapter));</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;      <span class="keywordflow">return</span> $string-&gt;substr($string-&gt;findLast(<span class="stringliteral">&quot;_&quot;</span>))-&gt;replace(array(<span class="stringliteral">&quot;_&quot;</span>, <span class="stringliteral">&quot; &quot;</span>), <span class="stringliteral">&quot;&quot;</span>)-&gt;toString();</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    }</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    <span class="keywordflow">return</span> <span class="stringliteral">&quot;Unknown&quot;</span>;</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a9d3e42ebfb02f2f9b4af8e80f2209b28"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Transport_Abstract::getMetaData </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns header/meta data from stream pointer. </p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="class_team_speak3___transport___exception.html" title="Enhanced exception class for TeamSpeak3_Transport_Abstract objects. ">TeamSpeak3_Transport_Exception</a></td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>array </dd></dl>

<p>Definition at line <a class="el" href="_transport_2_abstract_8php_source.html#l00225">225</a> of file <a class="el" href="_transport_2_abstract_8php_source.html">Abstract.php</a>.</p>
<div class="fragment"><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;  {</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    <span class="keywordflow">if</span>($this-&gt;stream === null)</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;    {</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;      <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="class_team_speak3___transport___exception.html" title="Enhanced exception class for TeamSpeak3_Transport_Abstract objects. ">TeamSpeak3_Transport_Exception</a>(<span class="stringliteral">&quot;unable to retrieve header/meta data from stream pointer&quot;</span>);</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    }</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    <span class="keywordflow">return</span> stream_get_meta_data($this-&gt;stream);</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a2b1d6d9d2f48fae3165cd5a863cdefe1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Transport_Abstract::isConnected </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns TRUE if the transport is connected. </p>
<dl class="section return"><dt>Returns</dt><dd>boolean </dd></dl>

<p>Definition at line <a class="el" href="_transport_2_abstract_8php_source.html#l00240">240</a> of file <a class="el" href="_transport_2_abstract_8php_source.html">Abstract.php</a>.</p>

<p>Referenced by <a class="el" href="_server_query_8php_source.html#l00089">TeamSpeak3_Adapter_ServerQuery\__destruct()</a>, and <a class="el" href="_transport_2_abstract_8php_source.html#l00252">TeamSpeak3_Transport_Abstract\waitForReadyRead()</a>.</p>
<div class="fragment"><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;  {</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    <span class="keywordflow">return</span> (is_resource($this-&gt;stream)) ? TRUE : FALSE;</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a9826487851b638f3ad942847eae49c58"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Transport_Abstract::waitForReadyRead </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$time</em> = <code>0</code>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Blocks a stream until data is available for reading if the stream is connected in non-blocking mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">integer</td><td class="paramname">$time</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="_transport_2_abstract_8php_source.html#l00252">252</a> of file <a class="el" href="_transport_2_abstract_8php_source.html">Abstract.php</a>.</p>

<p>References <a class="el" href="_transport_2_abstract_8php_source.html#l00197">TeamSpeak3_Transport_Abstract\getAdapter()</a>, <a class="el" href="_transport_2_abstract_8php_source.html#l00207">TeamSpeak3_Transport_Abstract\getAdapterType()</a>, <a class="el" href="_signal_8php_source.html#l00204">TeamSpeak3_Helper_Signal\getInstance()</a>, and <a class="el" href="_transport_2_abstract_8php_source.html#l00240">TeamSpeak3_Transport_Abstract\isConnected()</a>.</p>

<p>Referenced by <a class="el" href="_t_c_p_8php_source.html#l00082">TeamSpeak3_Transport_TCP\read()</a>, <a class="el" href="_u_d_p_8php_source.html#l00082">read()</a>, and <a class="el" href="_t_c_p_8php_source.html#l00106">TeamSpeak3_Transport_TCP\readLine()</a>.</p>
<div class="fragment"><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;  {</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;    <span class="keywordflow">if</span>(!$this-&gt;<a class="code" href="class_team_speak3___transport___abstract.html#a2b1d6d9d2f48fae3165cd5a863cdefe1" title="Returns TRUE if the transport is connected. ">isConnected</a>() || $this-&gt;config[<span class="stringliteral">&quot;blocking&quot;</span>]) <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    <span class="keywordflow">do</span> {</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;      $read = array($this-&gt;stream);</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;      $null = null;</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;      <span class="keywordflow">if</span>($time)</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;      {</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        <a class="code" href="class_team_speak3___helper___signal.html#af156036673730a599c10c8cbfd5e50bf" title="Returns a singleton instance of TeamSpeak3_Helper_Signal. ">TeamSpeak3_Helper_Signal::getInstance</a>()-&gt;emit(strtolower($this-&gt;<a class="code" href="class_team_speak3___transport___abstract.html#a4cbdd67c5590f756a4fb5ddd5d53bbe1" title="Returns the adapter type. ">getAdapterType</a>()) . <span class="stringliteral">&quot;WaitTimeout&quot;</span>, $time, $this-&gt;<a class="code" href="class_team_speak3___transport___abstract.html#a4ccffaa9c25155aee837d4e6dee8a037" title="Returns the TeamSpeak3_Adapter_Abstract object using this transport. ">getAdapter</a>());</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;      }</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;      $time = $time+$this-&gt;config[<span class="stringliteral">&quot;timeout&quot;</span>];</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    } <span class="keywordflow">while</span>(@stream_select($read, $null, $null, $this-&gt;config[<span class="stringliteral">&quot;timeout&quot;</span>]) == 0);</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>TeamSpeak3/Transport/<a class="el" href="_u_d_p_8php_source.html">UDP.php</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_team_speak3___transport___u_d_p.html">TeamSpeak3_Transport_UDP</a></li>
    <li class="footer">Generated on Fri Oct 11 2013 23:35:44 for TeamSpeak 3 PHP Framework by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.4 </li>
  </ul>
</div>
</body>
</html>
